package com.sg.service.base.app.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.dto.base.app.req.*;
import com.sg.entity.OmsBasicInstanceChangeColumn;
import com.sg.service.base.app.MOmsBasicInstanceChangeColumnService;
import com.wicket.okrapp.common.dto.FieldInfo;
import com.wicket.okrapp.common.exception.BizException;
import com.wicket.okrapp.dal.mapper.mbg.OmsBasicInstanceChangeColumnMapper;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @since 2022/1/19 15:39
 */
@Service
public class MOmsBasicInstanceChangeColumnServiceImpl
        extends ServiceImpl<OmsBasicInstanceChangeColumnMapper, OmsBasicInstanceChangeColumn>
        implements MOmsBasicInstanceChangeColumnService {

    @Autowired
    OmsBasicInstanceChangeColumnMapper omsBasicInstanceChangeColumnMapper;

    /**
     * 3-13-02查询业务应用变更字段列表[3609]
     * gen by moon at 10/15/2022, 10:06:16 PM
     */
    @Trace(operationName = "3-13-02查询业务应用变更字段列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsBasicInstanceChangeColumn> queryBizAppChangeColList(QueryBizAppChangeColListReq reqDto) {

        try {
            QueryWrapper<OmsBasicInstanceChangeColumn> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsBasicInstanceChangeColumn.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsBasicInstanceChangeColumn>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-13-02批量改业务应用变更字段[3610]
     * gen by moon at 10/15/2022, 10:06:16 PM
     */
    @Trace(operationName = "3-13-02批量改业务应用变更字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchUpdateBizAppChangeCol(List<OmsBasicInstanceChangeColumn> omsBasicInstanceChangeColumn) {

        if (omsBasicInstanceChangeColumn == null || omsBasicInstanceChangeColumn.size() == 0) {
            return false;
        }
        return super.saveOrUpdateBatch(omsBasicInstanceChangeColumn);

    }

    /**
     * 3-13-02批量删业务应用变更字段[3614]
     * gen by moon at 10/15/2022, 10:06:17 PM
     */
    @Trace(operationName = "3-13-02批量删业务应用变更字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchDeleteBizAppChangeCol(List<String> reqDto) {

        if (reqDto == null || reqDto.size() == 0) {
            return false;
        }

        return super.removeByIds(reqDto);
    }

    /**
     * 3-13-02新增业务应用变更字段[3892]
     * gen by moon at 10/15/2022, 10:06:18 PM
     */
    @Trace(operationName = "3-13-02新增业务应用变更字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public String addBizAppChangeCol(OmsBasicInstanceChangeColumn omsBasicInstanceChangeColumn) {
        omsBasicInstanceChangeColumn.setChangeColumnId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
        omsBasicInstanceChangeColumn.setIsArchive("FALSE");
        omsBasicInstanceChangeColumn.setArchivngType("NOT_ARCHIVE");
        omsBasicInstanceChangeColumn.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        omsBasicInstanceChangeColumn.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
        if (omsBasicInstanceChangeColumn != null && omsBasicInstanceChangeColumn.getSubjectLifeCycle() != null && omsBasicInstanceChangeColumn.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            omsBasicInstanceChangeColumn.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
        }
        omsBasicInstanceChangeColumn.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        omsBasicInstanceChangeColumn.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        if (omsBasicInstanceChangeColumn != null && omsBasicInstanceChangeColumn.getSubjectLifeCycle() != null && omsBasicInstanceChangeColumn.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            omsBasicInstanceChangeColumn.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
        }
        omsBasicInstanceChangeColumn.setIsValid("FALSE");
        omsBasicInstanceChangeColumn.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
        omsBasicInstanceChangeColumn.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
        if (super.save(omsBasicInstanceChangeColumn)) {
            return omsBasicInstanceChangeColumn.getChangeColumnId();
        } else {
            return "-1";
        }

    }

    /**
     * 3-13-02查询业务应用变更字段详情[3897]
     * gen by moon at 3/30/2023, 12:39:26 PM
     */
    @Trace(operationName = "3-13-02查询业务应用变更字段详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsBasicInstanceChangeColumn queryBizAppChangeColDetail(QueryBizAppChangeColDetailReq reqDto) {

        try {
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            QueryWrapper<OmsBasicInstanceChangeColumn> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsBasicInstanceChangeColumn> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsBasicInstanceChangeColumn retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-13-02删除业务应用变更字段[3898]
     * gen by moon at 10/15/2022, 10:06:20 PM
     */
    @Trace(operationName = "3-13-02删除业务应用变更字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean deleteBizAppChangeCol(String changeColumnId) {

        return super.removeById(changeColumnId);
    }

    /**
     * 3-13-02批量增业务应用变更字段[3902]
     * gen by moon at 10/15/2022, 10:06:21 PM
     */
    @Trace(operationName = "3-13-02批量增业务应用变更字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batchAddBizAppChangeCol(List<OmsBasicInstanceChangeColumn> omsBasicInstanceChangeColumn) {

        if (omsBasicInstanceChangeColumn == null || omsBasicInstanceChangeColumn.size() == 0) {
            return false;
        }

        return super.saveBatch(omsBasicInstanceChangeColumn.stream().map(item -> {
            item.setChangeColumnId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
            item.setIsArchive("FALSE");
            item.setArchivngType("NOT_ARCHIVE");
            item.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
            item.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
            if (item != null && item.getSubjectLifeCycle() != null && item.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
                item.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
            }
            item.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
            item.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
            if (item != null && item.getSubjectLifeCycle() != null && item.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
                item.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
            }
            item.setIsValid("FALSE");
            item.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            item.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
            return item;
        }).collect(Collectors.toList()));
    }

    /**
     * M3-13-02一键删除业务应用服务变更字段测试验证数据[4431]
     * gen by moon at 10/15/2022, 10:06:22 PM
     */
    @Trace(operationName = "M3-13-02一键删除业务应用服务变更字段测试验证数据")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean autoDeleteBasicInstanceChangeColumnTest(List<String> reqDto) {

        if (reqDto == null || reqDto.size() == 0) {
            return false;
        }

        return super.removeByIds(reqDto);
    }

    /**
     * M3-13-02查询业务应用服务变更字段测试列表[4442]
     * gen by moon at 10/15/2022, 10:06:23 PM
     */
    @Trace(operationName = "M3-13-02查询业务应用服务变更字段测试列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsBasicInstanceChangeColumn> queryBasicInstanceChangeColumnTestList(QueryBasicInstanceChangeColumnTestListReq reqDto) {

        try {
            QueryWrapper<OmsBasicInstanceChangeColumn> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsBasicInstanceChangeColumn.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsBasicInstanceChangeColumn>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3-13-02执行业务应用筛选更新字段主键（特殊方法）[4507]
     * gen by moon at 10/15/2022, 10:06:33 PM
     */
    @Trace(operationName = "M3-13-02执行业务应用筛选更新字段主键（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsBasicInstanceChangeColumn implementBizScreenUpdateFieldFk(ImplementBizScreenUpdateFieldFkReq reqDto) {
        return null; //todo ruizhe dong
    }

    /**
     * 3-13-02修改业务应用变更字段[4501]
     * gen by moon at 10/15/2022, 10:06:24 PM
     */
    @Trace(operationName = "3-13-02修改业务应用变更字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean updateBizAppChangeCol(OmsBasicInstanceChangeColumn omsBasicInstanceChangeColumn) {

        return super.updateById(omsBasicInstanceChangeColumn);
    }

    /**
     * M3-13-02执行业务变更字段【循环开始】[4503]
     * gen by moon at 3/30/2023, 12:39:27 PM
     */
    @Trace(operationName = "M3-13-02执行业务变更字段【循环开始】")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public OmsBasicInstanceChangeColumn implementBizChangeColLoopStart(ImplementBizChangeColLoopStartReq reqDto) {

        try {

            QueryWrapper<OmsBasicInstanceChangeColumn> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsBasicInstanceChangeColumn> retList = super.list(queryWrapper);
            if (retList != null && retList.size() > 0) {
                OmsBasicInstanceChangeColumn retData = retList.get(0);

                return retData;
            }
            return null;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * M3-13-02执行业务应用拼接主表修订记录（特殊方法）[4508]
     * gen by moon at 10/15/2022, 10:06:38 PM
     */
    @Trace(operationName = "M3-13-02执行业务应用拼接主表修订记录（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsBasicInstanceChangeColumn> implementBizSplicingMainTableRevisionRecord(ImplementBizSplicingMainTableRevisionRecordReq reqDto) {
        return null; //todo ruizhe dong
    }

    /**
     * 3-13-02批量查询业务应用变更字段列表ByIds[5209]
     * gen by moon at 11/17/2022, 7:58:20 AM
     */
    @Trace(operationName = "3-13-02批量查询业务应用变更字段列表ByIds")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsBasicInstanceChangeColumn> batchQueryBizAppChangeColListByIds(BatchQueryBizAppChangeColListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsBasicInstanceChangeColumn> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            if (reqDto.getBizAppChangeColList() == null || reqDto.getBizAppChangeColList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("change_column_id", reqDto.getBizAppChangeColList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsBasicInstanceChangeColumn.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsBasicInstanceChangeColumn>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-13-02批量查询数据集合并业务应用变更字段[5213]
     * gen by moon at 11/17/2022, 9:02:28 PM
     */
    @Trace(operationName = "3-13-02批量查询数据集合并业务应用变更字段")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsBasicInstanceChangeColumn> batchQueryDataSetMergebizAppChangeCol(BatchQueryDataSetMergebizAppChangeColReq reqDto) {

        try {
            QueryWrapper<OmsBasicInstanceChangeColumn> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            if (reqDto.getBizAppChangeColList() == null || reqDto.getBizAppChangeColList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("entity_id", reqDto.getBizAppChangeColList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsBasicInstanceChangeColumn.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsBasicInstanceChangeColumn>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

    /**
     * 3-13-02批量查询业务应用变更字段by内容表主键ID[5213]
     * gen by moon at 11/18/2022, 7:27:08 PM
     */
    @Trace(operationName = "3-13-02批量查询业务应用变更字段by内容表主键ID")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<OmsBasicInstanceChangeColumn> batchQueryBizAppChangeCol(BatchQueryBizAppChangeColReq reqDto) {

        try {
            QueryWrapper<OmsBasicInstanceChangeColumn> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            if (reqDto.getBizAppChangeColList() == null || reqDto.getBizAppChangeColList().isEmpty()) {
                return new ArrayList<>();
            }
            queryWrapper.in("entity_id", reqDto.getBizAppChangeColList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsBasicInstanceChangeColumn.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper, likeList, fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsBasicInstanceChangeColumn.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsBasicInstanceChangeColumn>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1", e, false);
        }
    }

}

